//
//  PFSetViewController.m
//  PFScan
//
//  Created by perfayMini on 2018/10/24.
//  Copyright © 2018 perfayMini. All rights reserved.
//

#import "PFSetViewController.h"

static NSString * Identifier = @"SetCell";


@interface PFSetViewController ()<UITableViewDelegate,UITableViewDataSource>
@property(nonatomic,strong)NSArray * sets;

@end

@implementation PFSetViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)config{
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.view addSubview:self.tableView];
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:Identifier];
    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(kNavigation_TOP_Margin);
        make.left.right.equalTo(self.view);
        make.bottom.equalTo(self.view).offset(-kTabBarHeight);
    }];
}


#pragma mark -------------   UITableViewDelegate,UITableViewDataSource

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:Identifier forIndexPath:indexPath];
    cell.textLabel.text = self.sets[indexPath.row];
    return cell;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return self.sets.count;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 50;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
}


- (NSArray *)sets{
    if(!_sets){
        _sets = @[@"扫码本地图片",@"生成二维码"];
    }
    
    return _sets;
}

@end
